package com.hyh.shiyanshiguanli.mapper;

import com.github.pagehelper.Page;
import com.hyh.shiyanshiguanli.domain.dto.PageDTO;
import com.hyh.shiyanshiguanli.domain.dto.StorageAddDTO;
import com.hyh.shiyanshiguanli.domain.entity.Storage;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author hyh
 * @version 1.0
 */
@Mapper
public interface StorageMapper {

    Page<Storage> page(PageDTO pageDTO);

    @Insert("insert into storage (type, name, num, model, buy_date, other, factory)" +
            "values (#{type},#{name},#{num},#{model},#{buyDate},#{other},#{factory})")
    void add(StorageAddDTO storageAddDTO);
}
